package InformationRetriever;

import InformationRetriever.QueryMethods.*;

public class QueryFactory {

    public static IQuery FactoryMethod(String type)
    {
        if(type.equals(Formulas.Cosine.toString()))
            return new CosineQuery();
        else if(type.equals(Formulas.DiceCoefficient.toString()))
            return new DiceCoefficientQuery();
        else if(type.equals(Formulas.EuclideanDistance.toString()))
            return new EuclideanDistanceQuery();
        else if(type.equals(Formulas.InnerProduct.toString()))
            return new InnerProductQuery();
        else if(type.equals(Formulas.JaccardCoefficient.toString()))
            return new JaccardCoefficientQuery();
        else if(type.equals(Formulas.ManhattanDistance.toString()))
            return new ManhattanDistanceQuery();
        else
            return null;
    }
}
